package com.berchen.数据结构.二叉树.平衡二叉树;

public class AVLTest {
    public static void main(String[] args) {

        AVLTree tree=new AVLTree();
//        int[] arr={4,3,6,5,7,8};
//        int[] arr={10,12,8,9,7,6};
        int[] arr={10,11,7,6,8,9};
        for(int i =0;i<arr.length;i++){
            tree.add(new AVLNode(arr[i]));
        }

        tree.infixOrder();
        System.out.println(tree.getHeight(true, tree.getRoot()));
        System.out.println(tree.getHeight(false, tree.getRoot()));
        System.out.println(tree.getTreeHeight());
        System.out.println(tree.getRoot());
//        System.out.println(tree.getRoot().left.left);
    }
}
